//
//  HHServiceCenterListViewController.m
//  HHBroker
//
//  Created by He Wei on 9/17/15.
//  Copyright © 2015 harry. All rights reserved.
//

#import "HHServiceCenterListViewController.h"


@interface HHServiceCenterListViewController ()

@property (nonatomic, strong) UIView *footerView;
@property (nonatomic, strong) UIButton *returnButton;

/*
 *  选中的城市中心下标
 */
@property (nonatomic, assign) NSInteger selectedShop;
//是否显示距离
@property (nonatomic, assign) BOOL showDistance;
//服务中心挂靠相关说明
@property (nonatomic, copy) NSString *serviceDes;

@end

@implementation HHServiceCenterListViewController

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - Life Cycle

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    if (self.allowSelected) {
        self.serviceDes = @"挂靠服务中心的目的:只有成功挂靠了，才可以申请成为红娘经纪人";
        self.title = @"选择挂靠的服务中心";
        [self.view addSubview:self.footerView];
        self.tableView.contentInset = UIEdgeInsetsMake(0, 0, 64, 0);
    } else {
        self.title = @"服务中心";
    }
//    [MBProgressHUD showHUDAddedTo:self.view animated:YES];
//   // [[LBSManager defaultManager] startUserLocationServiceWithComplete:^(NSString *city) {
//        self.showDistance = YES;
//        [self loadTableViewDataSource];
//    
//    } failure:^(NSError *error){
//        self.showDistance = NO;
//        [self loadTableViewDataSource];
//    }];
//    self.selectedShop = -1;
//    self.tableView.separatorStyle = UITableViewCellSelectionStyleNone;
}

//- (CGFloat)heightForString:(NSString *)string
//{
//    CGSize sizeToFit;
//    if (SYSTEM_IS_IOS7) {
//        NSDictionary *attribute = @{NSFontAttributeName:[UIFont systemFontOfSize:14.0f]};
//        sizeToFit = [string boundingRectWithSize:CGSizeMake(kCurrentWidth-30, 0)
//                                         options:NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading
//                                         attributes:attribute
//                                         context:nil].size;
//    } else {
//        sizeToFit = [string sizeWithFont:[UIFont systemFontOfSize:15.0f] constrainedToSize:CGSizeMake(kCurrentWidth-30, CGFLOAT_MAX) lineBreakMode:NSLineBreakByCharWrapping];
//    
 //   }
 //   return (float)sizeToFit.height+5;
//}

#pragma mark - Http
- (void)loadTableViewDataSource
{
    MBProgressHUD *hub = [MBProgressHUD HUDForView:self.view];
  //  NSString *urlString = [NSString stringWithFormat:@"%@?latitude=%@&longitude=%@", kUrlServiceCenterList, kCurrentLatitude, kCurrentLongitude];
    
    
    
    
    
    
    
    
    
    
    
    
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
